<html>
<head>
	<title>Java Script</title>
	<link rel="stylesheet" href="jsstyle.css"></link>
</head>

<body>
<p class="hs">JavaScript <span class="hs1">How To</span></p>
<ul>
	<li>The HTML <span class="h3">&lt;script&gt; </span> tag is used to insert a JavaScript into an HTML document.
	<li>The HTML "id" attribute is used to identify HTML elements.
</ul>
<p class="h1">Manipulating HTML Elements</p>
<p>
JavaScript is typically used to manipulate existing HTML elements.<br><br>

The HTML "id" attribute is used to identify HTML elements.<br><br>

To access an HTML element from a JavaScript, use the document.getElementById() method.<br><br>

The document.getElementById() method will access the HTML element with the specified id.<br><br>
</p>
<p class="h2">Example</p>
<p>Access the HTML element with the specified id, and change its content:</p>
<iframe  class="jsif" name="jsf1" width="100%" height="240" src="code/js1.txt" scrolling="no" frameborder="0"></iframe>
<p class="h1">Example Explained</p>
<p>To insert a JavaScript into an HTML page, use the<span class="h3"> &lt;script&gt;</span> tag.<br><br>

Inside the<span class="h3"> &lt;script&gt; </span> tag use the type attribute to define the scripting language.<br><br>

The<span class="h3"> &lt;script&gt; </span>and <span class="h3">&lt;/script&gt;</span>  tells where the JavaScript starts and ends.<br><br>

The lines between the<span class="h3"> &lt;script&gt; </span> and <span class="h3">&lt;/script&gt; </span> contain the JavaScript and are executed by the browser<br><br>
</p>
</body>
</html>
